package pl.register.android.database.tables;

/**
 * @author Mateusz Strzelecki
 * @since 2013-04-14
 */

public class StudentDBTable {
    private static final String SEPARATOR = ".";
	public static final String TABLE_NAME = "Student";

	public static final String ID = "student_id";
	public static final String FIRST_NAME = "first_name";
	public static final String LAST_NAME = "last_name";
	public static final String EMAIL = "email";
	public static final String PHONE_NUMBER = "phone_number";
	public static final String CITY = "city";

    public static final String STUDENT_ID = TABLE_NAME + SEPARATOR + ID;
    public static final String STUDENT_FIRST_NAME = TABLE_NAME + SEPARATOR + FIRST_NAME;
    public static final String STUDENT_LAST_NAME = TABLE_NAME + SEPARATOR + LAST_NAME;
    public static final String STUDENT_EMAIL = TABLE_NAME + SEPARATOR + EMAIL;
    public static final String STUDENT_PHONE_NUMBER = TABLE_NAME + SEPARATOR + PHONE_NUMBER;
    public static final String STUDENT_CITY = TABLE_NAME + SEPARATOR + CITY;

    public interface Query {
        public static final String CREATE_TABLE =
                "CREATE TABLE IF NOT EXISTS " + TABLE_NAME +
                        "(" +
                        ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
                        FIRST_NAME + " TEXT NOT NULL, " +
                        LAST_NAME + " TEXT NOT NULL, " +
                        EMAIL + " TEXT NOT NULL, " +
                        PHONE_NUMBER + " TEXT NOT NULL, " +
                        CITY + " TEXT NOT NULL" +
                        ");";

        public static final String DROP_TABLE =
                "DROP TABLE IF EXISTS " + TABLE_NAME + ";";
    }

}